.customer-service-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background-color: #f5f5f5;
}

/* 头部样式 */
.cs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background-color: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 100;
}

.back-btn {
  font-size: 24px;
  color: #333;
  cursor: pointer;
  padding: 8px;
}

.header-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-icon {
  font-size: 20px;
  color: #ff6b00;
}

.page-title {
  font-size: 18px;
  font-weight: bold;
  color: #333;
}

.connection-status {
  display: flex;
  align-items: center;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
}

.status-dot.connected {
  background-color: #52c41a;
}

.status-dot.disconnected {
  background-color: #ff4d4f;
}

/* 聊天容器 */
.chat-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

/* 日期分隔符 */
.date-separator {
  display: flex;
  justify-content: center;
  margin: 16px 0;
}

.date-text {
  background-color: #e6e6e6;
  color: #666;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 12px;
}

/* 消息容器 */
.messages-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 消息样式 */
.message {
  display: flex;
  margin-bottom: 12px;
}

.message.user {
  justify-content: flex-end;
}

.message.service {
  justify-content: flex-start;
}

.message-bubble {
  max-width: 70%;
  position: relative;
}

.message.user .message-bubble {
  background-color: #ff6b00;
  color: white;
  border-radius: 18px 18px 4px 18px;
  padding: 12px 16px;
}

.message.service .message-bubble {
  background-color: white;
  color: #333;
  border-radius: 18px 18px 18px 4px;
  padding: 12px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.message-content {
  margin-bottom: 4px;
}

.message-text {
  font-size: 16px;
  line-height: 1.4;
  word-wrap: break-word;
}

.message-image {
  max-width: 200px;
  max-height: 200px;
  border-radius: 8px;
  object-fit: cover;
}

.message-time {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  text-align: right;
}

.message.service .message-time {
  color: #999;
  text-align: left;
}

/* 输入区域 */
.input-container {
  display: flex;
  align-items: center;
  padding: 16px;
  background-color: #fff;
  border-top: 1px solid #eee;
  gap: 12px;
}

.input-bar {
  flex: 1;
  display: flex;
  align-items: center;
  background-color: #f5f5f5;
  border-radius: 20px;
  padding: 8px 16px;
  gap: 8px;
}

.message-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px;
  color: #333;
  padding: 4px 0;
}

.message-input::placeholder {
  color: #999;
}

.message-input:disabled {
  color: #ccc;
}

.input-actions {
  display: flex;
  gap: 8px;
}

.action-icon {
  font-size: 20px;
  color: #999;
  cursor: pointer;
  padding: 4px;
}

.action-icon:hover {
  color: #ff6b00;
}

.send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background-color: #e6e6e6;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.send-btn.active {
  background-color: #ff6b00;
  color: white;
}

.send-btn:disabled {
  cursor: not-allowed;
}

.send-btn:not(:disabled):hover {
  transform: scale(1.05);
}

/* 响应式设计 */
@media (max-width: 480px) {
  .cs-header {
    padding: 12px;
  }
  
  .chat-container {
    padding: 12px;
  }
  
  .input-container {
    padding: 12px;
  }
  
  .message-bubble {
    max-width: 80%;
  }
}

/* 滚动条样式 */
.chat-container::-webkit-scrollbar {
  width: 4px;
}

.chat-container::-webkit-scrollbar-track {
  background: transparent;
}

.chat-container::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 2px;
}

.chat-container::-webkit-scrollbar-thumb:hover {
  background: #999;
}
